package com.example.login.view

import com.example.login.api.UserApiService
import com.example.net.RetrofitUtils
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Qualifier
@Retention(AnnotationRetention.BINARY)
annotation class User{

}
@Module
@InstallIn(SingletonComponent::class)
class UserWorkModel {
    @User
    @Provides
    @Singleton
    fun provideRetrofit(): Retrofit {
        return RetrofitUtils.getRetrofit()
    }
    @Provides
    @Singleton
    fun provideCarService(@User retrofit: Retrofit): UserApiService {
        return retrofit.create(UserApiService::class.java)
    }
}